Decorate exception-based failures with seed#107
Closed
pbrisbin wants to merge 4 commits into
Closed
Conversation
By making any `SomeException` an `HUnitFailure`, we can use our `logFailingSeed` function to ensure we include the seed on those failures too. This does break exception handling happening outside of `runGraphulaT`, since any external catches for not-`HUnitFailure` will no longer catch.
Prefixing the text after using `formatFailureReason` erases the fact that the values was a `Reason` vs `ExpectedButGot`. The new approach prepends the text without changing the constructor. I doubt this matters, but it was easy enough and stops disrupting anyone inspecting such values (perhaps our JUnit formatter?).
Member
Author
|
I don't like this approach. I commented about why in #44. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix!: include seed on failures do to exceptions
3a67a3a
By making any
SomeExceptionanHUnitFailure, we can use ourlogFailingSeedfunction to ensure we include the seed on thosefailures too.
This does break exception handling happening outside of
runGraphulaT,since any external catches for not-
HUnitFailurewill no longer catch.chore: refactor FailureReason message building
a4b26d4
Prefixing the text after using
formatFailureReasonerases the factthat the values was a
ReasonvsExpectedButGot. The new approachprepends the text without changing the constructor.
I doubt this matters, but it was easy enough and stops disrupting anyone
inspecting such values (perhaps our JUnit formatter?).
chore: update tests for new exceptions
73595f7
chore: prefix with line breaks
b2343d5